package com.graduation.check.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/health")
public class HealthCheckController {

    @GetMapping
    public Map<String, Object> health() {
        Map<String, Object> response = new HashMap<>();
        response.put("status", "UP");
        response.put("message", "应用运行正常");
        response.put("timestamp", System.currentTimeMillis());
        return response;
    }

    @GetMapping("/check-endpoints")
    public Map<String, Object> checkEndpoints() {
        Map<String, Object> endpoints = new HashMap<>();
        endpoints.put("健康检查", "GET /api/health");
        endpoints.put("登录接口", "POST /api/auth/login");
        endpoints.put("简单测试", "GET /api/test/hello");
        return endpoints;
    }
}